package com.lyc.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：Xiaochen
 * @date ：Created in 2023/1/3 21:03
 * @description：
 * @modified By：
 * @version:
 */
@RestController
@RequestMapping("user")
public class UserController {
    @GetMapping("delete")
    @PreAuthorize(value = "hasAuthority('user:delete')")
    public String delete(){
        return "用户删除的操作";
    }
    @GetMapping("insert")
    @PreAuthorize(value = "hasAuthority('user:insert')")
    public String insert(){

        return "用户添加的操作";
    }
    @GetMapping("update")
    @PreAuthorize(value = "hasAuthority('user:update')")
    public String update(){

        return "用户修改的操作";
    }
    @GetMapping("query")
    @PreAuthorize(value = "hasAuthority('user:query')")
    public String query(){

        return "用户查询的操作";
    }
    @GetMapping("export")
    @PreAuthorize(value = "hasAuthority('user:export')")
    public String export(){

        return "用户导出的操作";
    }
}